package com.kandinfo.isbnmanage.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.kandinfo.isbnmanage.domian.IsbnInformation;
import com.kandinfo.isbnmanage.domian.IsbnOrder;
import com.kandinfo.isbnmanage.domian.IsbnPage;
import com.kandinfo.isbnmanage.repository.IsbnViewRepository;
import com.kandinfo.isbnmanage.service.IsbnViewService;

@Service
public class IsbnViewServiceImpl implements IsbnViewService {

	@Autowired
	private IsbnViewRepository isbnViewRepository;
	
	@Override
	public List<IsbnInformation> findInforByBarcode(String barcode) {
		
		return isbnViewRepository.findInforByBarcode(barcode);
	}
	
	@Override
	public IsbnInformation findInforByInforId(Long isbnInformationId) {
		
		return isbnViewRepository.findInforByInforId(isbnInformationId);
	}

	@Override
	public IsbnOrder findOrdersByInforId(Long isbnInformationId) {
		
		return isbnViewRepository.findOrdersByInforId(isbnInformationId);
	}

	@Override
	public List<IsbnPage> findPagesByInforId(Long isbnInformationId) {
		
		return isbnViewRepository.findPagesByInforId(isbnInformationId);
	}

	@Override
	public List<IsbnInformation> findInforByCond(String barcode, Long isbnInformationId) {
		return isbnViewRepository.findInforByCond(barcode,isbnInformationId);
	}

}
